Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow YAML output #628

Merged
merged 1 commit into from
Dec 12, 2023
Merged

feat: allow YAML output #628

merged 1 commit into from
Dec 12, 2023

Conversation

phm07
Copy link
Contributor

@phm07 phm07 commented Dec 12, 2023

This PR adds support for the -o=yaml flag wherever -o=json is possible. It uses https://github.com/goccy/go-yaml, which uses the already existing JSON tags on schema structs, so they don't need to be modified.

@phm07 phm07 added the feature label Dec 12, 2023
@phm07 phm07 self-assigned this Dec 12, 2023
@phm07 phm07 requested a review from a team as a code owner December 12, 2023 10:51
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 64 lines in your changes are missing coverage. Please review.

Comparison is base (9464cc0) 31.61% compared to head (d01fcba) 31.54%.

Files Patch % Lines
internal/cmd/output/output.go 10.00% 18 Missing ⚠️
internal/cmd/loadbalancer/metrics.go 0.00% 9 Missing ⚠️
internal/cmd/server/metrics.go 0.00% 9 Missing ⚠️
internal/cmd/server/request_console.go 0.00% 7 Missing ⚠️
internal/cmd/util/util.go 0.00% 3 Missing ⚠️
internal/cmd/all/list.go 75.00% 1 Missing and 1 partial ⚠️
internal/cmd/certificate/list.go 0.00% 1 Missing ⚠️
internal/cmd/datacenter/list.go 0.00% 1 Missing ⚠️
internal/cmd/firewall/list.go 0.00% 1 Missing ⚠️
internal/cmd/floatingip/list.go 0.00% 1 Missing ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #628      +/-   ##
==========================================
- Coverage   31.61%   31.54%   -0.08%     
==========================================
  Files         171      171              
  Lines        7857     7872      +15     
==========================================
- Hits         2484     2483       -1     
- Misses       5090     5106      +16     
  Partials      283      283              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@apricote apricote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add to the the describe base command? It currently allows JSON but not YAML output.

@phm07 phm07 merged commit 87552d2 into main Dec 12, 2023
3 checks passed
@phm07 phm07 deleted the yaml-output branch December 12, 2023 11:44
phm07 pushed a commit that referenced this pull request Dec 13, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.41.0](v1.40.0...v1.41.0)
(2023-12-13)


### Features

* allow YAML output
([#628](#628))
([87552d2](87552d2))
* **server:** allow to filter list by server status
([#629](#629))
([1cb51f2](1cb51f2)),
closes [#623](#623)


### Bug Fixes

* make JSON/YAML outputs consistent
([#622](#622))
([43944b8](43944b8))
* **server:** properly format request-console JSON output
([#626](#626))
([40641b6](40641b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants